<?php
namespace app\common\model;

class BonusAction extends Base
{
	
	protected $readonly = ['id'];
	protected $auto=[];
	protected $insert=['create_time'];

	protected function setCreateTimeAttr(){
		return time();
	}

	public function getDatas($where){
		$result = $this->where($where)->order('id','DESC')->select();
		if($result){
			foreach($result as &$res):
				$res = $res->toArray();
			endforeach;
		}else{
			$result=[];
		}
		return $result;
	}

}
